/*
 * analyser.h
 *
 *  Created on: Dec 6, 2012
 *      Author: hxin
 */

#ifndef ANALYSER_H_
#define ANALYSER_H_

#define BUFFSIZE 1000

#include "refHash.h"
#include "refAnalyser.h"
#include "hashGen.h"
#include <string>
#include <fstream>

using namespace std;

class analyser : public refAnalyser {
public:
	analyser();
	analyser(string refFileName, int KmerSize, int maxError = 5);
	analyser(string refFileName, int shortHTLength, int midHTLength,
			int longHTLength, int lvThreshold);
	analyser(const analyser& rhs);
	~analyser();
	analyser& operator= (const analyser& rhs);

	void sweepChromosome(int chrNum);
	void sweepChromosome(int chrNum, int readLength);

	void unloadHash();
	unsigned long int genStat(unsigned long int prevUnitColor);
	void printStat();
	void printPic(string picName, unsigned long int maxUnitColor);

private:
	refHash * ht;
	vector<unsigned int> KmerFreq;
	unsigned long int ppmBuff [BUFFSIZE];

	unsigned long long totalFreq;
};

#endif /* ANALYSER_H_ */
